<%@page import="com.xhd.Dao.SalerDaoImpl"%>
<%@page import="com.xhd.Dao.SalerDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
 <link rel="stylesheet" href="./css/Inf.css"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
        <style type="text/css">
	body {background: rgb(254,238,189);}
</style>
</head>
<body>
<c:if test="${ not empty sessionScope.user}">
	<%
	String fruit=request.getParameter("fruit"); 
	String buyer = request.getParameter("buyer");
	SalerDao sd=new SalerDaoImpl();
	sd.changeOrderState("intentionfail", fruit,buyer);
	if (!sd.haveOrderOrNot("意向订单")){
	sd.changeFruitState("salefail", fruit);
	}
	%>
	<div id="inf-box">
		<h1>交易取消成功！</h1>
		
		<a href="HistoryMessage.jsp">返回交易页面</a>
	</div>
</c:if>
<c:if test="${  empty sessionScope.user}">
<h1>你还未登录！</h1>
<a href="SalerLogin.jsp">点击登录</a>
</c:if>
</body>
</html>